#!/bin/sh /etc/rc.common

START=19 # just before network start

disable_sta_mode_wifi_interface() {
	local section="$1"
	config_get mode $section 'mode'
	config_get ssid $section 'ssid'
	if [ sta == $mode ] ; then
	    logger -s -t fqrouter disable sta mode wifi interface $ssid
		uci_set wireless $section disabled 1
	fi
}

start() {
	config_load 'wireless'
	config_foreach disable_sta_mode_wifi_interface 'wifi-iface'
	uci_commit
	logger -s -t fqrouter all sta mode wifi interfaces disabled
}
